Day 6: Managing Networking

TCP IP Model

Application

Presentation

Sesssion

Transport

Network

Data-Link

Physical


DNS and DHCP

DNS
BIND (Berkley Internet Name Deamon) or "Named" are other names for DNS

FQDN = host.<domain>.<domain>

DHCP
Automatic connection config information
Leases IPs to clients upon connection


IPv4 Addressing

Network Bits = Left
Host Bits = Right

Solve for hosts = Subtract
32 - <host bits> = CIDR

700 IPs:
32 - 10 (2^10=1024 Hosts; need 700) = 22 (CIDR = /22)

Solve for Networks = Add
Network Bits + Net bits needed = CIDR

700 Networks:
16 + 10 = /26


Hostname Configuration

hostnamectl set-hostname
OR
change it in /etc/hostname

nmcli = NetworkManager interface

nmcli conn add type ethernet co-name eth5 ifname eth5


Random shit

Wireless Configurations
iwconfig

Bridged Interface Configurations
brctl

NIC Bonding
Bonding two network interfaces together to be managed as one.


/etc/sysconfig/network-scripts/
File path containing configurations for network interfaces

etc/dhcp/dhclient.conf
dhclient <interface> - Tell client to get a DHCP address

ipconfig /renew

/etc/hosts

/etc/resolv.conf

/etc/nsswitch.conf

Interact with VMs from command line
virsh = Shell to work with KVM virtual machines

iperf = Throughput testing


LAB

Setting Hostname
hostnamectl set-hostname <honstname>

Making Hostname change persistent
systemctl restart systemd-hostnamed

NMCLI
nmcli general status - Current network status
nmcli connection show - Display name, UUID, Type, and Device of each NIC
nmcli con up <device> - Bring NIC up
nmcli con down <device> - Bring NIC down
nmcli con edit <device> - Statically configure IPs

NMTUI = GUI to configure network configurations

systemctl restart network = Restart networking service

Ethtool
ethtool <NIC>

NIC configuration files
/etc/sysconfig/network-scripts/<NIC>

DNC Configuration
/etc/resolv.conf = Clarifying DNS servers
/etc/hosts = Static text file for name resolution

host <domain> = Display DNS entries for domains
nslookup <domain>

Check for Virtualization
cat /proc/cpuinfo | grep <svm or vmx>

Start KVM Service
systemctl start libvirtd = Must have dependencies installed

YUM
yum -y install <packages>
yum check-update <packages>
yum --downloadonly <packages> = Download but don't install

Networking Troubleshooting
ss -l | less = What ports the system is listening on